home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archivers / XpkDisk / Install-XpkDisk < prev    next >
Text File  |  1996-09-26  |  5KB  |  170 lines

  1. ; xpdisk.device Installation :vi:nosi:noai
  2. ; $VER: $Id: Install-XpkDisk,v 1.2 1993/11/08 13:11:15 Rhialto Rel $
  3.  
  4. (set @app-name "xpkdisk.device")
  5. (welcome "xpkdisk.device Installation")
  6.  
  7. (if (= @user-level 2)
  8.     (set DEVS
  9.         (askdir
  10.             (prompt "Where do you keep your devices?")
  11.             (help @askdir-help)
  12.             (default "DEVS:")
  13.         )
  14.     )
  15.     (set DEVS "DEVS:")
  16. )
  17.  
  18. (copylib
  19.     (prompt (cat "Copying the device to " DEVS))
  20.     (help @copylib-help)
  21.     (source "xpkdisk.device")
  22.     (dest DEVS)
  23.     (confirm)
  24. )
  25.  
  26. (set mountliststyle (= 2 (exists "DEVS:DOSDrivers")))
  27.  
  28. (if (= @user-level 2)
  29.     (set mountliststyle
  30.         (askchoice
  31.             (prompt "What style of Mountlist do you want?")
  32.             (choices "1.2 .. 2.0 DEVS:Mountlist style"
  33.                      "2.1+ DEVS:DOSDrivers/ style")
  34.             (default mountliststyle)
  35.             (help @askchoice-help))
  36.     )
  37. )
  38.  
  39. (set XD0 "XD0")
  40. (set Compress0 "Compress0")
  41.  
  42. (select mountliststyle
  43. ; 0:
  44.     (
  45.         (set Mountfile (expandpath ("DEVS:Mountlist")))
  46.         (if (= Mountfile "") (set Mountfile "DEVS:Mountlist"))
  47.         (delete "T:TML2")
  48.         (textfile
  49.             (prompt "Adding Mountlist entry for a compressed disk of 10 megabytes.")
  50.             (help (cat ("This will work on system versions 1.2 and higher. \n\n"
  51.                         @copyfiles-help)))
  52.             (dest "T:TML2")
  53.             (append (cat XD0 ":\n"))
  54.             (include "Mountfile")
  55.             (append "#\n")
  56.             (confirm)
  57.         )
  58.         (if (exists "T:TML2") (
  59.             (if (exists Mountfile) (
  60.                 (copyfiles (source Mountfile) (dest "T:") (newname "TML1"))
  61.                 (textfile (dest Mountfile) (include "T:TML1") (include "T:TML2"))
  62.             )
  63.             (
  64.                 (textfile (dest Mountfile) (include "T:TML2"))
  65.             ))
  66.             (delete "T:TML2")
  67.         ))
  68.     )
  69. ; 1:
  70.     ((set Mountfile (tackon "DEVS:DOSDrivers" XD0))
  71.     (copyfiles
  72.         (prompt "Adding Mountfile for a compressed disk of 10 megabytes.")
  73.         (help (cat ("This will work on system versions 2.1 and higher. \n\n"
  74.                     @copyfiles-help)))
  75.         (source "Mountfile")
  76.         (dest "DEVS:DOSDrivers")
  77.         (newname XD0)
  78.         (infos)
  79.         (confirm)
  80.     ))
  81. )
  82.  
  83. (if (exists "ENV:EDITOR")
  84.     (set Editor (getenv "EDITOR"))
  85.     (set Editor "")
  86. )
  87. (if (and (= Editor "") (exists "SYS:Tools/MEmacs"))
  88.     (set Editor "SYS:Tools/MEmacs")
  89. )
  90. (if (and (= Editor "") (exists "C:Ed"))
  91.     (set Editor "C:Ed")
  92. )
  93.  
  94. (if (not (= Editor ""))
  95.     (run (cat Editor " " Mountfile)
  96.         (prompt "Do you want to edit the Mountlist?")
  97.         (help (cat "You may want this to change the size "
  98.                    "of your compressed disk."))
  99.         (confirm)
  100.     )
  101. )
  102.  
  103. (if (exists "XPKD:" (noreq))
  104.     (set XPKD (expandpath "XPKD:"))
  105.     (set XPKD "Work:XPKD")
  106. )
  107.  
  108. (set XPKD
  109.     (askdir
  110.         (prompt "Where do you want the compressed data to be stored?")
  111.         (help (cat "You should preferably select an empty directory, or "
  112.                    "create new directory. \n\n"
  113.                    @askdir-help))
  114.         (default XPKD)
  115.     )
  116. )
  117.  
  118. (set UserStartup (cat "Assign XPKD: " XPKD "\nMount " XD0 ":\n"))
  119.  
  120. (startup "xpkdisk"
  121.     (prompt (cat
  122.             "One Assign needs to be added to the \"S:user-startup\" "
  123.             "so that your system will be properly configured to use "
  124.             "xpkdisk.\n"
  125.             "The disk also needs to be mounted before use."))
  126.     (command UserStartup)
  127.     (help @startup-help)
  128. )
  129.  
  130. (makeassign "XPKD" XPKD (safe))
  131.  
  132. (run "xdPrefs"
  133.     (prompt "Running xpkdisk preferences.")
  134.     (help "You want this to select further options.")
  135.     (safe)
  136. )
  137.  
  138. (copyfiles
  139.     (prompt "Copying xpkdisk preferences program.")
  140.     (help @copyfiles-help)
  141.     (source "xdPrefs")
  142.     (dest "SYS:Prefs")
  143.     (infos)
  144.     (confirm)
  145. )
  146.  
  147. (copyfiles
  148.     (prompt (cat "Copying free space recovery program.\n\n"
  149.                  "This program works only from the Shell."))
  150.     (help @copyfiles-help)
  151.     (source "xdClear")
  152.     (dest "XPKD:")
  153.     (infos)
  154.     (confirm)
  155. )
  156.  
  157. (run (cat "C:Mount " XD0 ":"))
  158.  
  159. (run (cat "SYS:System/Format <NIL: drive " XD0 ": name " Compress0 " QUICK FFS")
  160.     (prompt "Quick-formatting the compressed disk with the FastFileSystem.")
  161.     (help "The disk must be formatted before use.")
  162.     (confirm)
  163. )
  164.  
  165. (run "AmigaGuide xpkdisk.guide"
  166.     (prompt "Running AmigaGuide xpkdisk.guide.")
  167.     (help "You want this to read the documentation.")
  168.     (safe)
  169. )
  170.